//**************************************************************//
//  Effect File exported by RenderMonkey 1.6
//
//  - Although many improvements were made to RenderMonkey FX  
//    file export, there are still situations that may cause   
//    compilation problems once the file is exported, such as  
//    occasional naming conflicts for methods, since FX format 
//    does not support any notions of name spaces. You need to 
//    try to create workspaces in such a way as to minimize    
//    potential naming conflicts on export.                    
//    
//  - Note that to minimize resulting name collisions in the FX 
//    file, RenderMonkey will mangle names for passes, shaders  
//    and function names as necessary to reduce name conflicts. 
//**************************************************************//

//--------------------------------------------------------------//
// Show Texcoord
//--------------------------------------------------------------//
//--------------------------------------------------------------//
// Pass 0
//--------------------------------------------------------------//
string Show_Texcoord_Pass_0_Model : ModelData = "..\\..\\..\\..\\Programme\\AMD\\RenderMonkey 1.82\\Examples\\Media\\Models\\Sphere.3ds";

float4x4 matViewProjection : ViewProjection;

struct VS_INPUT 
{
   float4 Position: POSITION0;
   float2 TexCoord: TEXCOORD0;
   
};

struct VS_OUTPUT 
{
   float4 Position: POSITION0;
   float2 TexCoord: TEXCOORD0;
   
};

VS_OUTPUT Show_Texcoord_Pass_0_Vertex_Shader_vs_main( VS_INPUT Input )
{
   VS_OUTPUT Output;

   Output.Position = mul( Input.Position, matViewProjection );
   Output.TexCoord = Input.TexCoord;

   return( Output );
   
}




float size
<
   string UIName = "size";
   string UIWidget = "Numeric";
   bool UIVisible =  false;
   float UIMin = -1.00;
   float UIMax = 0.00;
> = float( 0.14 );

struct PS_INPUT 
{
   float2 TexCoord: TEXCOORD0;
   
};

float4 Show_Texcoord_Pass_0_Pixel_Shader_ps_main( PS_INPUT Input ) : COLOR0
{
   float4 color;
   
   if ((Input.TexCoord.x % size) > (size*0.5))
   {
      if ((Input.TexCoord.y % size) > (size*0.5))
      { 
         color = float4(0.0f, 0.0f, 0.0f, 0.0f);
      }
      else 
      {
         color = float4 (1.0f, 1.0f, 1.0f, 1.0f);
      }
   }
   else
   {
      if ((Input.TexCoord.y % size) > (size*0.5))
      {   
         color = float4(1.0f, 1.0f, 1.0f, 1.0f);
      }
      else 
      {
         color = float4 (0.0f, 0.0f, 0.0f, 0.0f);
      }
   }

   
   return( color );
   
}




//--------------------------------------------------------------//
// Technique Section for Show Texcoord
//--------------------------------------------------------------//
technique Show_Texcoord
{
   pass Pass_0
   {
      VertexShader = compile vs_2_0 Show_Texcoord_Pass_0_Vertex_Shader_vs_main();
      PixelShader = compile ps_2_0 Show_Texcoord_Pass_0_Pixel_Shader_ps_main();
   }

}

